package FrameWork.World;

import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;

public class GodFactory {

    private SceneThreadFactory sceneThreadFactory = new SceneThreadFactory();
    private AtomicInteger counter = new AtomicInteger();

    public God newGod(){
        God god = new God();
        Thread thread = sceneThreadFactory.newThread(god);
        god.setBindThread(thread);
        god.setName(God.DEFAULT_NAME+counter.getAndIncrement());
        return god;
    }


}
